<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <div id="box1"></div>

  <script src="./lib/art-template-v4.13.2.js"></script>
  <script src="./lib/jquery-v3.6.0.js"></script>
  <!-- 定义模板结构 -->
  <script type="text/html" id="temp1">
    <h4>{{time}}</h4>
  </script>

  <script>
    $(function () {
      // 定义数据源
      const obj = {
        time: Date.now()
      }

      const htmlStr = template('temp1', obj)
      $('#box1').html(htmlStr)
    })
  </script>
</body>

</html>